package cn.istartfinancial.service;


import cn.istartfinancial.entity.SysRoleUser;
import cn.istartfinancial.entity.SysUser;
import cn.istartfinancial.util.Checkbox;
import cn.istartfinancial.util.JsonUtil;
import cn.istartfinancial.util.ReType;
import java.util.List;

/**
 * @author: Nzp
 * @date: 2018/8/22
 * @description: 用户相关服务接口
 */
public interface SysUserService
{

    SysUser login(String username);


    int deleteByPrimaryKey(String id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(String id);

    /**
     * 分页查询
     * @param
     * @return
     */
    List<SysUser> selectListByPage(SysUser sysUser);

    int count();

    /**
     * 新增
     * @param user
     * @return
     */
    int add(SysUser user);

    /**
     * 删除
     * @param id
     * @return
     */
    JsonUtil delById(String id, boolean flag);

    int checkUser(String username);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser sysUser);

    List<SysRoleUser> selectByCondition(SysRoleUser sysRoleUser);

    List<Checkbox> getUserRoleByJson(String id);

    /**
     * 更新密码
     * @param user
     * @return
     */
    int rePass(SysUser user);

    List<SysUser> getUserByRoleId(String roleId, int page, int limit);

    int countUserByRoleId(String roleId, int page, int limit);

    ReType show(SysUser user, Integer valueOf, Integer valueOf1);
}
